/*
 * TCPServerConnectionFactoryWrapper.h
 *
 *  Created on: Sep 11, 2017
 *      Author: zjf
 */

#ifndef SRC_TCPSERVERCONNECTIONFACTORYWRAPPER_H_
#define SRC_TCPSERVERCONNECTIONFACTORYWRAPPER_H_

#include <Poco/Net/TCPServerConnectionFactory.h>
#include <Poco/NotificationQueue.h>
#include "TCPServerConnectionWrapper.h"
#include "TCPServerChannel.h"

using namespace Poco;
using namespace Poco::Net;

namespace network
{

class TCPServerConnectionFactoryWrapper: public TCPServerConnectionFactory
{
public:
	TCPServerConnectionFactoryWrapper(std::vector<TCPServerChannel::Ptr>& vecChannels);
	virtual ~TCPServerConnectionFactoryWrapper();

	TCPServerConnection* createConnection(const StreamSocket& socket);
private:
	std::vector<TCPServerChannel::Ptr>& _vecChannels;
};

} /* namespace network */

#endif /* SRC_TCPSERVERCONNECTIONFACTORYWRAPPER_H_ */
